<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" th:replace="layout-admin">
<head>
    <meta charset="UTF-8">


    <th:block th:fragment="header">
        <style>
            #app a {margin-right:20px;}




        </style>
    </th:block>

</head>
<body>

<div class="container-md" id="container" th:fragment="content">
    <div id="app">


        <div class="card">
            <div class="card-header">
                <h3 class="card-title">快捷</h3>
                <div class="card-tools">
                    <button type="button" class="btn btn-default btn-sm" data-card-widget="collapse" title="Collapse">
                        <i class="fas fa-minus"></i>
                    </button>
                </div>
            </div>
            <div class="card-body">
                <a class="btn btn-primary" href="/trade/list">订单</a>
                <a class="btn btn-primary" href="/trade/produce/todo/list">待拼订单</a>
                <a class="btn btn-primary" href="/makeup/batch/list">拼版</a>
                <a class="btn btn-primary" href="/migration/trade/list">老系统订单</a>
                <a  class="btn btn-default"  href="/pointcard/index">积分卡</a>

                <a  class="btn btn-default"  href="/schedule/list">定时任务</a>
            </div>

        </div>


        <div class="card">
            <div class="card-header">
                <h3 class="card-title">拼版</h3>
                <div class="card-tools">
                    <button type="button" class="btn btn-default btn-sm" data-card-widget="collapse" title="Collapse">
                        <i class="fas fa-minus"></i>
                    </button>
                </div>
            </div>
            <div class="card-body">
                <template v-for="o in producerList">
                    <div v-if="o.produceStatus" class="panel panel-default" style="display:inline-block">
                        <div class="pnael-body">

                            <a class="btn btn-info" :href=`/makeup/batch/make?type=${o.produceCode}`>
                                启动{{o.name}}拼版
                            </a>
                        </div>
                    </div>

                </template>

            </div>
        </div>


        <div class="card">
            <div class="card-header">
                <h3 class="card-title">其它</h3>
                <div class="card-tools">
                    <button type="button" class="btn btn-default btn-sm" data-card-widget="collapse" title="Collapse">
                        <i class="fas fa-minus"></i>
                    </button>
                </div>
            </div>
            <div class="card-body">


                <a href="/pdd/order/list" class="btn btn-default">
                    拼多多订单
                </a>
<!--                <a href="/pdd/order/note/upload" class="btn btn-success">-->
<!--                    拼多多订单标注-->
<!--                </a>-->

                <a href="/pdd/order/note/update/item/list" class="btn btn-success">
                    拼多多 订单标注
                </a>


                <a class="btn btn-default" href="/yagao/order/list">雅高订单</a>
                <a class="btn btn-default" href="/yagao/order/upload">上传雅高订单文件</a>

                <a class="btn btn-default" href="/yagao/order/log/list">雅高订单日志</a>
            </div>
        </div>

        <div class="card">
            <div class="card-header">
                <h3 class="card-title">基础配置</h3>
                <div class="card-tools">
                    <button type="button" class="btn btn-default btn-sm" data-card-widget="collapse" title="Collapse">
                        <i class="fas fa-minus"></i>
                    </button>
                </div>
            </div>
            <div class="card-body">

                <a class="btn btn-default" href="/shop/list">店铺</a>
                <a class="btn btn-default" href="/texture/list">材质</a>
                <a class="btn btn-default" href="/paper/list">纸张</a>
                <a class="btn btn-default" href="/postprocessing/list">工艺</a>
                <a class="btn btn-default" href="/color/list">颜色</a>
                <a class="btn btn-default" href="/printing/list">印刷</a>
                <a class="btn btn-default" href="/product/list">产品</a>
                <a class="btn btn-default" href="/producer/list">工厂</a>
                <a class="btn btn-default" href="/produce/makeup/cell/price/list">合版价格</a>
                <a class="btn btn-default" href="/role/list">角色</a>
                <a class="btn btn-default" href="/user/list">用户</a>
                <a class="btn btn-default" href="/role/user/list">角色-用户</a>
                <a class="btn btn-default" href="/unwelcome/list">黑名单</a>
            </div>

        </div>

        <div style="position:fixed;right:10px;bottom:10px;">

        </div>
    </div>


</div>

<th:block th:fragment="footer">
    <script>


const { createApp } = Vue;
    var app = createApp({
    data() {
      return {
        producerList:[],
        currentIndex : -1,
        selector:{target:{}}
      }
    }
  }).mount('#app');


function loadProducerData( ){
    axios.post('/producer/list', {}).then(function (response) {
        app.$data.producerList = response.data.data;
    }).catch(function (error) {
        console.log("error",error);
    });
}

window.onload=function(){
   loadProducerData( );
}







    </script>
</th:block>
</body>
</html>